package org.ielse.frame.util;

import org.ielse.frame.C;

import android.text.TextUtils;
import android.util.Log;

public class LogUtil {

	public static void t(String text, Object... args) {
		// do nothing
	}

	public static void i(String text, Object... args) {

		if (C.settings.DEBUG && !TextUtils.isEmpty(text)) {
			if (args.length > 0) text = String.format(text, args);
			Log.i(C.settings.LOG_TAG, text);
		}
	}

	public static void d(String text, Object... args) {
		if (C.settings.DEBUG && !TextUtils.isEmpty(text)) {
			if (args.length > 0) text = String.format(text, args);
			Log.d(C.settings.LOG_TAG, text);
		}
	}

	public static void w(String text, Object... args) {
		if (C.settings.DEBUG && !TextUtils.isEmpty(text)) {
			if (args.length > 0) text = String.format(text, args);
			Log.w(C.settings.LOG_TAG, text);
		}
	}

	public static void e(String text, Object... args) {
		if (C.settings.DEBUG && !TextUtils.isEmpty(text)) {
			if (args.length > 0) text = String.format(text, args);
			Log.e(C.settings.LOG_TAG, text);
		}
	}
}
